#基于alpine镜像
FROM alpine

#替换软件仓库地址为阿里云源
RUN sed -i 's@dl-cdn.alpinelinux.org@mirrors.aliyun.com@g' /etc/apk/repositories && \
    apk update && \
    apk add nginx && \
    mkdir -p /var/jxdl

#拷贝war包到镜像里
COPY nginx.conf /etc/nginx/nginx.conf

#拷启动脚本到镜像
COPY init.sh /

#创建容器时开机自启动,执行init.sh
ENTRYPOINT ["sh","-x","/init.sh"]
